﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace WQDSkin.Forms.Controls.Help
{
    public static class ItemHelper
    {
        public static readonly DependencyProperty SelectedBackgroundBrushProperty
          = DependencyProperty.RegisterAttached(
              "SelectedBackgroundBrush",
              typeof(Brush),
              typeof(ItemHelper),
              new FrameworkPropertyMetadata(default(Brush), 
                  FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits));

       [Category("WQD.Default")] 
        [AttachedPropertyBrowsableForType(typeof(ListBoxItem))]
        [AttachedPropertyBrowsableForType(typeof(WQDTreeViewItem))]
        public static Brush GetSelectedBackgroundBrush(UIElement element)
        {
            return (Brush?)element.GetValue(SelectedBackgroundBrushProperty);
        }

    }
}
